div(ng-controller="AuthCtrl")
  .outer
    include partials/frame-common-actions
    .inner
      .view-result(ng-hide="password_change_required")
        article.help
          .container-fluid
            .section.row-fluid.summary(ng-show="!static_is_authenticated")
              .summary.col-sm-3
                h3 Connect to Neo4j
                p.lead
                  | Database access requires an authenticated connection.
              .details.col-sm-9(ng-hide="static_is_authenticated")
                .form
                  .row
                    .col-sm-5
                      | Username
                      br
                      input.form-control(type='text', on-enter="focus", on-enter-target-id="connect_password", focus-on="1", ng-model="username", style="margin: 0")
                      br
                  .row
                    .col-sm-5
                      | Password
                      br
                      input.form-control(id="connect_password", on-enter="click", on-enter-target-id="connect_button", type='password', ng-model="password", style="margin: 0")
                      br
                  .row.form-info
                    .col-sm-5
                      | Default username/password:&nbsp;
                      b neo4j
                      /
                      b neo4j
                  .row
                    .col-sm-5
                      br
                      button.btn.btn-default(id="connect_button", ng-click="authenticate()", style="margin: 0") Connect
            .section.row-fluid.summary(ng-if="static_is_authenticated && !password_change_required && !static_user")
              .summary.col-sm-3
                h3 Connection to Neo4j
                p.lead
                  | Connected.
              .details.col-sm-9
                p Connected to Neo4j (no auth required).
            .section.row-fluid.summary(ng-show="static_is_authenticated && !password_change_required && static_user")
              .summary.col-sm-3
                h3 Connected to Neo4j
                p.lead
                  | Nice to meet you.
              .details.col-sm-9
                p
                ul.big.undecorated
                  li
                    span.center-tbl-left-col.inline
                      | You are connected as user&nbsp;
                    code
                      | {{static_user}}
                    br
                    span.center-tbl-left-col.inline
                      | to the server&nbsp;
                    code {{static_host}}    
                  li
                    p.lead {{policy_message}}
      .view-result.fade(ng-show="password_change_required")
        include partials/frame-change-password
      .status-bar(ng-class='{error: frame.detailedErrorText, loading: frame.isLoading}')
        .status(ng-show="frame.detailedErrorText")
          .fa.fa-exclamation-triangle.icon-warning-sign &nbsp;
          span {{frame.detailedErrorText}}
